package com.my;

import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;

/**
 * Created by Zhang on 2018/8/4.
 * springboot启动类
 */
@SpringBootApplication
@EnableAutoConfiguration
@MapperScan("com.my.mapper") // mybatis扫描路径，针对的是接口Mapper类//必须加这个，不加报错，如果不加，也可以在每个mapper上添加@Mapper注释，
//配置druid必须加的注解，如果不加，访问页面打不开，filter和servlet、listener之类的需要单独进行注册才能使用
// spring boot里面提供了该注解起到注册作用
@ServletComponentScan(value = "com.my.config")
public class Application {

    public  static  void main(String [] args){
        System.err.println("Springboot启动中....");
        SpringApplication.run(Application.class,args);
        System.err.println("Springboot启动成功！");
    }
}
